package com.example.taobao

import okhttp3.ResponseBody
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST

interface Httpservice {

    @GET("getall1.jsp")
    fun getAll(): retrofit2.Call<ArrayList<addressinfo>>

    @FormUrlEncoded
    @POST("addaddress.jsp")
    fun addaddresss(
        @Field("name") name: String,
        @Field("phonenumber") phonenumber: String,
        @Field("suozaidiqu") suozaidiqu: String,
        @Field("xiangxidiz") xiangxidiz: String,
        @Field("username") username: String
    ): retrofit2.Call<ResponseBody>

  /*  @FormUrlEncoded
    @POST("alter.jsp")
    fun alter(
        @Field("oldname") oldname: String,
        @Field("newname") newname: String
    ):retrofit2.Call<ResponseBody>

    @FormUrlEncoded
    @POST("delete.jsp")
    fun delete(
        @Field("name") name: String
    ):retrofit2.Call<ResponseBody>*/
}